<script>
var str = "\"alert('hello')\"";
var obj = JSON.parse(str);
console.log(obj);
</script>